import { Component, OnInit } from '@angular/core';
import { Location } from '@angular/common';
import { Router } from '@angular/router';

@Component({
  selector: 'app-showmessage',
  templateUrl: './showmessage.component.html',
  styleUrls: ['./showmessage.component.less']
})
export class ShowmessageComponent implements OnInit {

  nowNav: any = '理想区域数据展示';

  constructor(private location: Location, private router: Router) { }

  ngOnInit() { }

  goBack() {
    this.location.back();
  }

  goMain() {
    this.router.navigateByUrl('/');
  }

  goNext() {
    this.location.forward();
  }

  setTitle(value: any) {
    switch(value) {
      case 1:
        this.nowNav = '理想区域数据展示';
        break;
      case 2:
        this.nowNav = '合适的停车区域数据展示';
        break;
      case 3:
        this.nowNav = "最优置换方案数据展示";
        break;
    }
  }

}
